Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/#12 send letter #59

Merged
merged 4 commits into from
Jan 1, 2024
Merged

Feature/#12 send letter #59

merged 4 commits into from
Jan 1, 2024

Conversation

codeJiwon
Copy link
Member

πŸ“’ κ°œμš”

API μ—°κ²° μ‹œλ„

πŸ“ Issue 번호

#12

πŸ› οΈ μž‘μ—…μ‚¬ν•­

μ—λŸ¬ 해결해야함.

πŸ“Έ μŠ€ν¬λ¦°μƒ·(선택)

@codeJiwon codeJiwon self-assigned this Dec 30, 2023
Copy link
Member Author

@codeJiwon codeJiwon Dec 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
μ½˜μ†”μ°½μ— μ΄λ ‡κ²Œ 찍히고 있음
NoSuchMethodError: '[]'에 λŒ€ν•΄ κ²€μƒ‰ν•΄λ΄€λ”λ‹ˆ μ „λ‹¬λ˜λŠ” 값에 null값이 μžˆλŠ” κ²½μš°λ‚˜ κ΄€λ ¨ ν•¨μˆ˜κ°€ μ •μ˜λ˜μ–΄ μžˆμ§€ μ•Šμ„ λ•Œ μƒκΈ°λŠ” 였λ₯˜λΌκ³  함.
<의문1> receiverIdλ₯Ό '2'둜 μž„μ˜λ‘œ μ„€μ •ν–ˆλŠ”λ° κ·Έκ²ƒμœΌλ‘œ 인해 생긴 였λ₯˜μΌκΉŒ? Receiver: null이 error 메세지인 것 같은데 ν˜Ήμ‹œ 이게 λ¬Έμ œμ΄λ €λ‚˜

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

일단 μ΄κ²ƒλ§Œ λ³΄κ³ λŠ” μ–΄λ–€ μ½”λ“œλ‘œμΈν•΄μ„œ λ‚˜μ˜¨ 결괏값인지 μ•Œμˆ˜κ°€μ—†μœΌλ‹ˆκΉŒ μ•žμœΌλ‘œλŠ” μ½”λ“œ μžμ²΄μ— μ½”λ©˜νŠΈ 뢀탁해.....제봘.. μ–΄λ–€κ±Έ printν–ˆμ„λ•Œ null인지에 따라 해결방법이 μ²œμ°¨λ§Œλ³„μΌν…Œλ‹ˆκΉŒ...!

Copy link
Member Author

@codeJiwon codeJiwon Dec 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ½˜μ†”μ°½ κ²°κ³Όλ₯Ό 보면 μ—¬κΈ°μ„œλΆ€ν„° catch문에 빠지고 있음. μ—¬κΈ°μ„œλΆ€ν„° 해결해야함.
<의문2> sendLetter μ•ˆμ— Map λŒ€μ‹  int receiverId, String content, String title을 λ„£μ–΄μ•Όν• κΉŒ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

의문 2 처럼 μ˜λ¬Έμ μ„ μ“°λ €λ©΄ κ·Έλ ‡κ²Œ μƒκ°ν•˜λŠ” μ΄μœ λ„ 제발 ν¬ν•¨ν•΄μ„œ 써쀘....
그리고 μ΄λ˜ν•œ μ–΄λ””μ˜ Map을 λ§ν•˜λŠ”κ±΄μ§€, μ–΄λ–€ νŒŒμΌμ— μžˆλŠ” sendLetterν•¨μˆ˜λ₯Όλ§ν•˜λŠ”건지(repository, provider 파일 등등에 λ‹€ μ € ν•¨μˆ˜κ°€ μ •μ˜λΌμžˆμž–μ•„) λ‚΄κ°€ 직접 μœ μΆ”λ₯Ό ν•΄μ•Όν•˜λŠ”λ°..... μ •ν™•ν•œ μ½”λ“œμ— μ½”λ©˜νŠΈ λ‹¬μ•„μ€˜.

print('sendLetter result: $isSuccess');
return isSuccess;
} catch (error) {
print('sendLetter error: $error');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이런 μ‹μœΌλ‘œ..

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

의문 2 처럼 μ˜λ¬Έμ μ„ μ“°λ €λ©΄ κ·Έλ ‡κ²Œ μƒκ°ν•˜λŠ” μ΄μœ λ„ 제발 ν¬ν•¨ν•΄μ„œ 써쀘....
그리고 μ΄λ˜ν•œ μ–΄λ””μ˜ Map을 λ§ν•˜λŠ”κ±΄μ§€, μ–΄λ–€ νŒŒμΌμ— μžˆλŠ” sendLetterν•¨μˆ˜λ₯Όλ§ν•˜λŠ”건지(repository, provider 파일 등등에 λ‹€ μ € ν•¨μˆ˜κ°€ μ •μ˜λΌμžˆμž–μ•„) λ‚΄κ°€ 직접 μœ μΆ”λ₯Ό ν•΄μ•Όν•˜λŠ”λ°..... μ •ν™•ν•œ μ½”λ“œμ— μ½”λ©˜νŠΈ λ‹¬μ•„μ€˜.

const host = "http://3.35.110.214";

class LetterProvider extends GetConnect {
Future<Response> sendLetter(Map data) => post(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그리고 λ§Œμ•½μ— 이뢀뢄을 λ§ν•˜λŠ”κ±°λΌλ©΄
letterReqDto.toJson()을 λ³΄λƒˆμž–μ•„..근데 μ € κ°’μ˜ μžλ£Œν˜•μ„ Map<String, dynamic> μ΄λ ‡κ²Œ 정해놓고 λ³΄λƒˆλŠ”λ° 이뢀뢄을 μ™œ λ°”κΏ”μ•Ό ν•œλ‹€κ³  μƒκ°ν•œκ±΄μ§€ λͺ¨λ₯΄κ²Ÿμ–΄.
μ•žμœΌλ‘œλŠ” κΌ­. κ·Έ 생각/의문점의 μ΄μœ λ„ ν¬ν•¨ν•΄μ„œ λ‚¨κ²¨μ€˜.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ–΄ μ—¬κΈ° λ°”κΏ”μ•Ό ν•˜λŠ”μ§€λ₯Ό λ¬Όμ–΄λ³Έκ±° λ§žλŠ”λ° λ‹Ήμ‹œ μ—λŸ¬λœ¨λŠ”κ²Œ μ „λ‹¬λ˜λŠ” κ°’ 쀑에 null이 μžˆλ‹€κ³  ν•΄μ„œ Map에 데이터듀이 μ•ˆ λ‹΄κ²¨μ„œ κ·ΈλŸ°κ°€ κ³ λ―Όν–ˆμ—ˆμ–΄.

@Jinyshin Jinyshin merged commit 87fe40e into main Jan 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants